package com.fengye.algorithms.leecode;

import java.util.Arrays;

/**
 * @Author fengye
 * @Date 2023/4/10 9:36
 **/
public class SortedSquares977 {
    public int[] sortedSquares(int[] nums) {
        int[] arr = new int[nums.length];
        for(int i=0;i<nums.length;i++) {
            arr[i] = nums[i] * nums[i];
        }

        Arrays.sort(arr);
        return arr;
    }
}
